<template>
	<view class="navBar">
		<view class="cu-bar bg-white">
			<view class="action">
				<u-icon name="home" size="26" @click="toHome"></u-icon>
			</view>
			<view class="content text-bold">
				Mcake
			</view>
			<view class="action text-grey">
				<text class="cuIcon-search"></text>
				<u-line margin="10upx" direction="col" length="20px"></u-line>
				<text class="cuIcon-list" @tap="toLogin"></text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "nav-custom",
		data() {
			return {

			};
		},
		methods: {
			toLogin() {
				// let userInfo = this.$store.state.user.userInfo
				// if(Object.keys(userInfo).length) {
				// 	uni.navigateTo({
				// 		url: '/pages/user/user'
				// 	})
				// 	return
				// }
				// uni.navigateTo({
				// 	url: '/pages/login/login'
				// })
				uni.navigateTo({
					url: '/subPackages/user/user'
				})
			},
			toHome() {
				console.log(111)
				uni.navigateTo({
					url: "/pages/home/home"
				})
			}
		}
	}
</script>

<style lang="scss">
.navBar{
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1;
}
</style>
